<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="include/header.jsp"%>
<script type="text/javascript" src="${path}/script/orderDetail.js"></script>
<script type="text/javascript" src="${path}/plugin/jquery-easyUI/plugins/datagrid-detailview.js"></script>
 <input type="hidden" id="orderId" value="${orderId}"/>
<div data-options="region:'center'",style="width:85%;">
       <table id="dg" style="width:100%;height:100%"
                   pagination="true"
                   title="订单详情"
                   toolbar="#toolbar"
                   singleSelect="true" fitColumns="true">
           </table>
        <div id="toolbar">
            <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="newDetail()">添加</a>
        </div>
        <div id="dlg" class="easyui-dialog" style="width:400px;height:400px;padding:10px 20px"
                     closed="true" buttons="#dlg-buttons">
            <div class="ftitle">详情信息</div>
            <form id="fm" method="post" novalidate>
                <input type="hidden" id="formOrderId"name="orderId"/>
                <div class="fitem">
                    <label>产品名称</label>
                    <input name="name" class="easyui-textbox">
                </div>
                <div class="fitem">
                    <label>数量</label>
                    <input type="text" name="number" class="easyui-numberbox" data-options="min:0,precision:0,value:0" />
                </div>
                <div class="fitem">
                    <label>单价</label>
                    <input type="text" name="unitPrice" class="easyui-numberbox" data-options="min:0,precision:2,value:0.00" />
                </div>
                <div class="fitem">
                    <label>出借日期</label>
                    <input type="text" name="start" class="easyui-datebox" data-options="formatter:myformatter,parser:myparser" />
                </div>
                <div class="fitem">
                    <label>算法类别</label>
                    <input class="easyui-combobox"
                        name="algValue"
                        data-options="url:'/Lease/algorithms.json',valueField:'value',textField:'text'">
                </div>
                <div class="fitem">
                    <label>参数</label>
                    <input type="text" name="params" class="easyui-numberbox" data-options="min:0,precision:0,value:0" /><br>
                     <span>平方计算和固定日计算时使用</span>
                </div>
                <div class="fitem">
                    <label>备注</label>
                    <input name="remark" class="easyui-textbox" />
                </div>
            </form>
        </div>
        <div id="dlg-buttons">
            <a href="javascript:void(0)" class="easyui-linkbutton c6" iconCls="icon-ok" onclick="saveDetail()"
               style="width:90px">保存</a>
            <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel"
               onclick="javascript:$('#dlg').dialog('close')" style="width:90px">退出</a>
        </div>
        <div id="dlg-bt" class="easyui-dialog" style="width:400px;height:280px;padding:10px 20px"
                             closed="true" buttons="#dlg-buttons-bt">
        <div class="ftitle">报停信息</div>
        <form id="fm-bt" method="post" novalidate>
            <input type="hidden" id="detailId" name="detailId"/>
            <div class="fitem">
                <label>数量</label>
                <input name="number" class="easyui-textbox" validType="number">
            </div>
            <div class="fitem">
                <label>归还日期</label>
                <input name="stop" class="easyui-datebox" data-options="formatter:myformatter,parser:myparser">
            </div>
        </form>
    </div>
    <div id="dlg-buttons-bt">
        <a href="javascript:void(0)" class="easyui-linkbutton c6" iconCls="icon-ok" onclick="saveStopped()"
           style="width:90px">保存</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel"
           onclick="javascript:$('#dlg-bt').dialog('close')" style="width:90px">退出</a>
    </div>
        <style type="text/css">
            #fm{
            margin:0;
            padding:10px 30px;
            }
            .ftitle{
            font-size:14px;
            font-weight:bold;
            padding:5px 0;
            margin-bottom:10px;
            border-bottom:1px solid #ccc;
            }
            .fitem{
            margin-bottom:5px;
            }
            .fitem label{
            display:inline-block;
            width:80px;
            }
            .fitem input{
            width:160px;
            }
        </style>
    </div>
<%@ include file="include/footer.jsp"%>